/*
 * $HeadURL:  $
 *
 * Copyright (c) 2007 Drutt Corporation, all rights reserved.
 *
 */
package homework.james.xiao.bean;

import java.io.Serializable;

import com.thoughtworks.xstream.annotations.XStreamAlias;


/**
 * @author eyngxao
 * @version $Revision: $
 * 一个订购项：某个user定购了某道dish
 */
@XStreamAlias("order") 
public class Order implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 4277108371318039101L;

	/** Class revision */
	public static final String _REV_ID_ = "$Revision: $";

	private User user;
	private Dish dish;
	public Order(){
		
	}
	public Order(User u, Dish d){
		setUser(u);
		setDish(d);
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public Dish getDish() {
		return dish;
	}
	public void setDish(Dish dinner) {
		this.dish = dinner;
	}
	public String toString(){
		return "|\t " +user.getName()+"\t|\t"+dish.getName()+"\t|  " + dish.getPrice() + "\t|";
	}
}
